namespace MvvmFx.Common.ViewModels.Behaviors.LoadingSaving
{
    public interface IViewModelSaver<T> : IViewModelSaver where T : ILoadSaveable
    {
        /// <summary>
        /// Saves the state of the ViewModel back to the corresponding business objects
        /// in the model.
        /// </summary>
        /// <param name="vm"></param>
        void Save(T vm);
    }

    public interface IViewModelSaver
    {
        /// <summary>
        /// Saves the state of the ViewModel back to the corresponding bussiness objects
        /// in the model.
        /// </summary>
        /// <param name="vm"></param>
        void Save(ILoadSaveable vm);
    }
}